//
//  YOUfanLocationUtils.h
//  NewYoufanApp
//
//  Created by 九月 on 7/20/24.
//

#import <Foundation/Foundation.h>

#import <CoreLocation/CoreLocation.h>

NS_ASSUME_NONNULL_BEGIN

@interface YOUfanLocationUtils : NSObject

+ (instancetype)manager;

/// 开始定位
- (void)fyanouStartLocation;
- (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock;
- (void)startLocationWithGeocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock;
- (void)startLocationWithSuccessBlock:(void (^)(NSArray<CLLocation *> *))successBlock failureBlock:(void (^)(NSError *error))failureBlock geocoderBlock:(void (^)(NSArray *geocoderArray))geocoderBlock;

- (void)startLocationToSuccessBlock:(void (^)(NSString *longitude, NSString *latitude))heiyouBlock;

/// 结束定位
- (void)stopUpdatingLocation;

- (void)heiyouGetCityName:(void (^)(NSString *heiyouName, NSString *fanfanCode))heiyouBlock;

- (NSArray *)heiyouGetCitySubsWith:(NSString *)fanfanCode;

/**
 检查当前授权状态
 */
- (void)checkAuthorizationStatus;

- (BOOL)fyanouCanUseLocation;

@property (strong, nonatomic) NSString *fyanouLat;
@property (strong, nonatomic) NSString *fyanouLon;

@property (strong, nonatomic) NSString *ttotheProviceName;
@property (strong, nonatomic) NSString *ttotheCityName;

@property (strong, nonatomic) NSString *ttotheCityCode;

@property (nonatomic, copy) void(^ttatheDidLocationChange)(void);

@end

NS_ASSUME_NONNULL_END
